/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

.ouiFilterGroup {
  display: inline-flex;
  max-width: 100%;
  border-right: 1px solid $ouiFormBorderColor;
  box-shadow: 0 1px 2px -1px transparentize($ouiShadowColor, .8), 0 3px 3px -2px transparentize($ouiShadowColor, .8);
  overflow: hidden;

  > * {
    flex: 1 1 auto;
    min-width: $ouiSize * 3;
  }

  > .ouiFilterButton--noGrow  {
    flex-grow: 0;
  }

  > .ouiFilterButton-hasNotification {
    min-width: $ouiSize * 6;
  }

  > .ouiFilterButton--hasIcon {
    min-width: $ouiSize * 8;
  }

  // Force popover anchors to expand for now
  .ouiPopover__anchor {
    display: block;

    .ouiFilterButton {
      width: 100%;
    }
  }
}

.ouiFilterGroup--fullWidth {
  display: flex;
}

@include ouiBreakpoint('xs', 's') {
  .ouiFilterGroup {
    flex-wrap: wrap;
  }
}

@include ouiBreakpoint('xs') {
  // Force all tiny screens to take up the entire width
  .ouiFilterGroup {
    display: flex;

    .ouiFilterButton {
      // sass-lint:disable-block no-important
      flex-grow: 1 !important;
    }
  }
}
